package br.com.aplic.teste.bean;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
public abstract class GenericDAO<T> {
	
	@PersistenceContext
	private EntityManager entityManager;

	@Transactional
	public void save(T entidade) {
		entityManager.persist(entidade);
	}
}
